<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>修改密码</title>
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="../css/font-awesome-4.3.0/css/font-awesome.min.css" />
		<link href="../css/config.css" rel="stylesheet" />
		<link href="../css/app.css" rel="stylesheet" />
		<link href="../css/base.css" rel="stylesheet" />
		<link href="../css/index.css" rel="stylesheet" />
	</head>
	<body class="mui-fullscreen">
		<header class="mui-bar mui-bar-nav km-navbar" style="box-shadow:none;">
			<a class="mui-icon mui-icon-back mui-pull-left mui-action-back" ></a>
			<h1 id="title" class="mui-title km-view-title">修改密码</h1>
		</header>
		<div class="mui-content3"> 
			<div class="changeCode-area">
				<label>请输入旧密码</label>
				<div>
				<input type="password" id="txt_oldpwd" placeholder="旧密码"/>
				</div>
				<label>请输入新密码</label>
				<div>
				<input type="password" id="txt_newpwd" placeholder="新密码"/>
				</div>
				<a class="change-code-button" ontouchstart="UpdatebPwd()">确认更改</a>
			</div>
		</div>
	</body>
	<script src="../js/mui.min.js"></script>
	<script src="../js/dlCommon.js"></script>
	<script src="../js/Global.js"></script>
	<script src="../js/config.js"></script>
	<script>
		mui.init({
			swipeBack: true,
			statusBarBackground: '#2ABB9C',
			statusBarStyle: 'UIStatusBarStyleBlackOpaque'
		});
		     	//修改密码
function UpdatebPwd() {
    //验证登陆
    if (!IsLogin()) {
        return;
    }
    var oldpwd=document.getElementById("txt_oldpwd").value;
    var newpwd=document.getElementById("txt_newpwd").value;
    if ( oldpwd== "") {
       dLong.alert("旧密码不能为空！");
        return;
    }
    if (newpwd == "") {
        dLong.alert("新密码不能为空！");
        return;
    }
    dLong.getJSON(config.ipRoot + "view/hospital/ajax/Ajax_HospitalUser.ashx?action=updatepwd",
    {uuid:config.uuid(),yyid:config.yyid,appid:config.appid,userid:config.userid,pwd:oldpwd,newpwd:newpwd,key:config.key,Rnd:Math.random()},
            function (data) {
                if (data.Type == "Error") {
                   dLong.alert(data.Message);
                   return;
                }
                else {
                    dLong.alert("修改成功！");
                    mui.back();
                }
            });
}
	</script>
</html>